﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MuseumDetails.aspx.cs" Inherits="MuseumDetails"
    MasterPageFile="~/MuseumOwner.master" %>

<asp:Content ID="cntLogin" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">

    <script language="javascript" type="text/javascript">
        function Validate() {
            if (document.getElementById("<%=txtMuseumName.ClientID%>").value == "") {
                alert("Museum Name can not be blank.");
                document.getElementById("<%=txtMuseumName.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtAddress.ClientID%>").value == "") {
                alert("Address can not be blank.");
                document.getElementById("<%=txtAddress.ClientID%>").focus();
                return false;

            }
            if (document.getElementById("<%=txtDetails.ClientID%>").value == "") {
                alert("Details can not be blank.");
                document.getElementById("<%=txtDetails.ClientID%>").focus();
                return false;
            }

            if (document.getElementById("<%=ddlCity.ClientID%>").value == "") {
                alert("Please select city.");
                document.getElementById("<%=ddlCity.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtMuseumLink.ClientID%>").value == "") {
                alert("Museum Link can not be blank.");
                document.getElementById("<%=txtMuseumLink.ClientID%>").focus();
                return false;
            }

            return true;
        }
    </script>

    <div>
        <table width="100%" cellspacing="3" cellpadding="3" border="0">
            <tr>
                <td>
                    <asp:Label ID="lblMuseumName" Text="Museum Name" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtMuseumName" runat="server" MaxLength="100" Width="200px"></asp:TextBox>
                    &nbsp;<b style="color: red;">*</b>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblAddress" Text="Address" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server" MaxLength="255" TextMode="MultiLine"
                        Rows="4" Width="200px"></asp:TextBox>
                    &nbsp;<b style="color: red;">*</b>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblDetails" Text="Details" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtDetails" runat="server" MaxLength="1000" TextMode="MultiLine"
                        Rows="4" Width="200px"></asp:TextBox>
                    &nbsp;<b style="color: red;">*</b>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblCountryName" Text="Country" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:DropDownList ID="ddlCountry" runat="server" Width="200px" DataTextField="CountryName"
                        DataValueField="CountryId" AutoPostBack="true" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">
                    </asp:DropDownList>&nbsp;<b style="color: red;">*</b>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblCity" Text="City" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:DropDownList ID="ddlCity" runat="server" DataTextField="CityName" DataValueField="CityID"
                        Width="200px">
                    </asp:DropDownList>&nbsp;<b style="color: red;">*</b>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblPartner" Text="Partner" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:DropDownList ID="ddlPartner" runat="server" Width="200px">
                        <asp:ListItem Text="Yes" Value="1" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="No" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblRating" Text="Rating" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:DropDownList ID="ddlRating" runat="server" Width="200px">
                        <asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="2" Value="2"></asp:ListItem>
                        <asp:ListItem Text="3" Value="3"></asp:ListItem>
                        <asp:ListItem Text="4" Value="4"></asp:ListItem>
                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblMuseumLink" Text="Museum Link" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtMuseumLink" runat="server" MaxLength="100" Width="200px"></asp:TextBox>
                    &nbsp;<b style="color: red;">*</b>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnSubmit" Text="Submit" runat="server" runat="server" OnClick="btnSubmit_Click"
                        OnClientClick="return Validate();" />&nbsp;&nbsp;
                    <asp:Button ID="btnReset" Text="Reset" runat="server" OnClick="btnReset_Click" />&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Visible="true"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
